/**
 * url转对象
 * @param { string } url url
 * @return { object } { path:源路径, query:参数对象  }
 */
export function urlToObject(url){
	const query = {}
	let [ path, stringQuery ] = url.split('?')
	stringQuery?.split('&').forEach(item=>{
		const [ key, value ] = item.split('=')
		query[key] = value
	})
	return {
		path,
		query
	}
}